<?php
namespace Core\Common\Component\Cache;

/**
 * 对缓存的Tag包装
 * Class TaggedCache
 * @package App\Component\Cache
 */
abstract class TaggedCache implements CacheStore
{
    /**
     * @var string[]
     */
    protected $tags;

    /**
     * @var CacheStore
     */
    protected $store;

    /**
     * TaggedCache constructor.
     * @param CacheStore $store
     * @param array $tags
     */
    public function __construct(CacheStore $store, array $tags)
    {
        $this->store = $store;
        $this->tags = $tags;
    }

    public function tags($names)
    {
        return $this->store->tags($names);
    }
}